<template>
	<nut-navbar class="nav-bar" placeholder safe-area-inset-top fixed :title="name" size="32rpx" custom-color="#333">
		<template #left>
			<nut-icon @tap="back" name="left" custom-color="#333" />
		</template>
	</nut-navbar>
</template>

<script setup>
	import {
		defineProps
	} from 'vue'
	const {
		name,
		delta
	} = defineProps(['name', 'delta'])
	const back = () => {
		uni.navigateBack({
			delta: delta || 1
		});
	}
</script>

<style scoped lang="scss">
	.nav-bar {
		// position: fixed;
		// top: 0;
		// width: 100%;
		// left: 0;
	}
</style>